<%@ include file="/common/taglibs.jsp"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="catalog" tagdir="/WEB-INF/tags/catalog"%>
<%@ taglib prefix="product" tagdir="/WEB-INF/tags/product"%>
<%@ taglib prefix="customer" tagdir="/WEB-INF/tags/customer"%>
<%@ taglib prefix="sales" tagdir="/WEB-INF/tags/sales"%>
<head>
	<%@ include file="include/promoRuleFormi18n_cn.jspf"%>
	<script type="text/javascript"	src="${ctxPath}/scripts/probiz/sales/promoRuleForm.js?rs=${appConfig.rs}"></script>
	<script type="text/javascript"	src="${ctxPath}/scripts/probiz/sales/promoRuleFormi18n_cn.js?rs=${appConfig.rs}"></script>
	<probiz:pageHeading entityName="${promoRule.name}"	entityHeadingKey="promoRuleDetail.heading" />
</head>
<content tag="buttons">
	<authorize:authorizeResource resourceString="/sales/promoRule*doAction=save">
		<probiz:iconBtn btnType="save"	onclick="savePromoRule();" />
	</authorize:authorizeResource>
	<c:if test="${promoRule.promoRuleId!=null}">
		<probiz:iconBtn btnType="delete" onclick="return fnDoDelete(this);" />
	</c:if>
<probiz:iconBtn btnType="back"	onclick="doCancelForm();" />
</content>
<probiz:showBindErrors bindPath="promoRule.*" />

<probiz:ui_tabs tabsId="detail" />
<div>
	<div class="top clearfix">
		<ul class="tab" id="detail">
			<li class="curr">
				<a href="#tab-summary"><span><fmt:message key="promoRuleDetail.summary" /> </span> </a>
			</li>
			<li>
				<a href="#tab-elements"><span><fmt:message key="promoRuleDetail.detail" /> </span> </a>
			</li>
			<c:if test="${promoRule.promoType == 'couponPromotion'}">
				<li><a  href="#tab-coupons"><span><fmt:message key="promoRuleDetail.coupon" /> </span> </a>
			</li>
		</c:if>
		</ul>
	</div>
	<div class="modify" id="promoRule">
		<form:form method="post" cssClass="mainForm" id="promoRuleForm" name="promoRuleForm"commandName="promoRule" action="${ctxPath}/sales/promoRule.html">
			<%@ include file="./include/promoRuleFormSummary.jsp"%>
			<%@ include file="./include/promoRuleFormElements.jsp"%>
			<c:if test="${promoRule.promoType == 'couponPromotion'}">
				<%@ include file="./include/promoRuleFormCoupons.jsp"%>
			</c:if>
		</form:form>
	</div>
</div>
<div style="display:none;">
	<product:productSelector selectorId="productSelector" callbackFunc="getProduct"/>
	<product:productSkuSelector selectorId="productSkuSelector" callbackFunc="getProductSku"/>
	<catalog:productCategorySelector selectorId="productCategorySelector" callbackFunc="getCategory"/>
	<customer:customerSelector selectorId="customerSelector" callbackFunc="getCustomer"/>
	<sales:giftSelector selectorId="giftSkuSelector" callbackFunc="getGiftSku"/>
</div>
<v:javascript formName="promoRule" staticJavascript="false" />
<c:set var="plugin_droppy" value="true" scope="request"/>
<c:set var="probizJs_dwr" value="true" scope="request"/>
<c:set var="ui_spinner" value="true" scope="request"/>
<script type="text/javascript" src="${ctxPath}/dwr/interface/membershipDwr.js?rs=${appConfig.rs}"></script>
<script type="text/javascript" src="${ctxPath}/dwr/interface/brandDwr.js?rs=${appConfig.rs}"></script>
<script type="text/javascript" src="${ctxPath}/dwr/interface/shippingMethodDwr.js?rs=${appConfig.rs}"></script>
<script type="text/javascript" src="${ctxPath}/dwr/interface/couponTypeDwr.js?rs=${appConfig.rs}"></script>
<script type="text/javascript" >
$j(document).ready(function () {
	currencySymbol = "${currencySymbol}";
});	

//返回
function doCancelForm() {
	window.history.back(-1);
}
</script>
<%@ include file="include/promoRuleFormRuleLoad.jsp"%>
